<template>
  <div class="page">
    <c-title :hide="false" text="门店"></c-title>


    <div class="diy" v-if="componet">
      <template v-for="(item, index) in componet">
        <component :key="index"
                   :is="item.component_key"
                   :datas="item.remote_data"
                   :home="true"
                   :tag="123"
                   :index="index"
                   :all="componet.length"
        >
        </component>
      </template>
      <div style="height: 3.3125rem;"></div>
      <div v-if="fun.isIphoneX()" style="height: 34px;"></div>
    </div>
  </div>
</template>

<script>
  import cTitle from "components/title";
  import cMent from "components/ment";
  import cGoodsList from "components/goodsList";
  import { Toast } from "vant";

  //旧装修
  // import showbanner from "components/temp/banner";
  // import showsign from "components/temp/showsign";
  // import showmenu from "components/temp/menu";
  // import showtitle from "components/temp/title";
  // import showsearch from "components/temp/search";
  // import showline from "components/temp/line";
  // import showblank from "components/temp/blank";
  // import showrichtext from "components/temp/richtext";
  // import showpicture from "components/temp/picture";
  // import showcube from "components/temp/cube";
  // import showarea from "components/temp/area";
  // import showshop from "components/temp/shop";
  // import showgoods from "components/temp/goods";
  // import shownearbygoods from "components/temp/near_goods";
  // import shownotice from "components/temp/notice";
  // import showlocation from "components/temp/location";
  // import showstore from "components/temp/stores";
  // import showcoupon from "components/cupcon";
  // import showheadline from "components/topline";
  // import showarticle from "components/article";
  // import showvideo from "components/temp/video";
  import cMyswipe from "components/myswipe";
  import { Swipe, SwipeItem } from "components/meswipe";

  import newcomerAward from "components/newcomer_award"; //新人奖

  //新装修
  import top_navigation from "components/new_diy/top_navigation";
  import U_article from "components/new_diy/article";
  import U_backup from "components/new_diy/backup";
  import U_blank from "components/new_diy/blank";
  import U_button from "components/new_diy/button";
  import U_community from "components/new_diy/community";
  import U_coupons from "components/new_diy/coupons";
  import U_cpssearch from "components/new_diy/cpssearch";
  import U_cube from "components/new_diy/cube";
  import U_deposit from "components/new_diy/deposit";
  import U_form from "components/new_diy/form";
  import U_goods from "components/new_diy/goods";
  import U_goodscps from "components/new_diy/goodscps";
  import U_goodsgroup from "components/new_diy/goodsgroup";
  import U_ywmgroup from "components/new_diy/ywmgroup";
  import U_goodsnearby from "components/new_diy/goodsnearby";
  import U_goodsrush from "components/new_diy/goodsrush";
  import U_goodstores from "components/new_diy/goodstores";
  import U_headline from "components/new_diy/headline";
  import U_homedata from "components/new_diy/homedata";
  import U_line from "components/new_diy/line";
  import U_livestreaming from "components/new_diy/livestreaming";
  import U_location from "components/new_diy/location";
  import U_lottery from "components/new_diy/lottery";
  import U_maps from "components/new_diy/maps";
  import U_notice from "components/new_diy/notice";
  import U_richtext from "components/new_diy/richtext";
  import U_search from "components/new_diy/search";
  import U_staff from "components/new_diy/staff";
  import U_shopfor from "components/new_diy/shopfor";
  import U_shortvideo from "components/new_diy/shortvideo";
  import U_signin from "components/new_diy/signin";
  import U_simplegraph from "components/new_diy/simplegraph";
  import U_slideshow from "components/new_diy/slideshow";
  import U_stores from "components/new_diy/stores";
  import U_storesranking from "components/new_diy/storesranking";
  import U_suspendbutton from "components/new_diy/suspendbutton";
  import U_tabcontrol from "components/new_diy/tabcontrol";
  import U_title from "components/new_diy/title";
  import U_video from "components/new_diy/video";
  import U_stargroup from "components/new_diy/stargroup";
  import U_foot from "components/new_diy/foot";
  import U_moretabcontrol from "components/new_diy/multistageTab";
  import U_selfpick from "components/new_diy/selfpick";
  import U_wechatcode from "components/new_diy/wechatcode";
  import U_bonuspool from "components/new_diy/bonusPoolsShow";
  import U_lawyer from "components/new_diy/lawyer";
  export default{
    components: {
      cTitle,
      cMent,
      cGoodsList,
      cMyswipe,
      Swipe,
      SwipeItem,
      newcomerAward,

      //旧装修弃用了
      // showflashsale: () => import('../../components/time_limit'),
      // showbusiness: () => import('../../components/temp/business'),
      // showassemble: () => import('../../components/time_group'),
      // showdiyform: () => import('../../components/temp/form'),
      // showlivestreaming: () => import('../../components/temp/livestreaming'),
      // showtogetherpurchase: () => import('../../components/temp/group_buy'),
      // showbanner,
      // showsign,
      // showmenu,
      // showtitle,
      // showsearch,
      // showline,
      // showblank,
      // showrichtext,
      // showpicture,
      // showcube,
      // showarea,
      // showshop,
      // showgoods,
      // shownearbygoods,
      // shownotice,
      // showlocation,
      // showstore,
      // showcoupon,
      // showheadline,
      // showarticle,
      // showvideo,

      //新装修
      top_navigation,
      U_article,
      U_backup,
      U_blank,
      U_button,
      U_community,
      U_coupons,
      U_cpssearch,
      U_cube,
      U_deposit,
      U_form,
      U_goods,
      U_goodscps,
      U_goodsgroup,
      U_goodsnearby,
      U_goodsrush,
      U_goodstores,
      U_headline,
      U_homedata,
      U_line,
      U_livestreaming,
      U_location,
      U_lottery,
      U_maps,
      U_notice,
      U_richtext,
      U_search,
      U_staff,
      U_shopfor,
      U_shortvideo,
      U_signin,
      U_simplegraph,
      U_slideshow,
      U_stores,
      U_storesranking,
      U_suspendbutton,
      U_tabcontrol,
      U_title,
      U_video,
      U_stargroup,
      U_foot,
      U_moretabcontrol,
      U_selfpick,
      U_wechatcode,
      U_bonuspool,
      U_scanpicture:()=>import("components/new_diy/U_scanpicture"),
      U_ywmgroup,
      U_lawyer
    },
    data(){
      return{
        store_id:"",
        componet:[]
      }
    },
    activated() {
      // this.componet = []
      this.store_id = this.$route.query.store_id
      this.getdiy()
    },
    mounted(){
      // this.store_id = this.$route.query.store_id || this.$route.params.store_id
      // this.getdiy()
    },
    methods:{
      getdiy(){
        $http
        	.post("plugin.store-decorate.frotend.index.get-page", {
        		store_id:this.store_id,
        		page_type: '1',
        		page_sort: '1',
        	})
        	.then(response => {
						this.componet = []
            this.componet = JSON.parse(response.datas)
            console.log(this.componet)
        		// if (response.result == 1) {
        		// } else {
        		// 	Toast(response.msg);
        		// }
        	})
        	.catch(error => {
        		console.log(error);
        	});
      }
    }
  }
</script>

<style>
</style>